
public abstract class CaffeineBeverage {
	 //metoda template
    public final void prepareRecipe()
    {
               boilWater();
               brew();
               pourInCup();
               addCondiments();
       }
    
   //algoritmul de prepare bauturii 
       public abstract void brew();
       
       //algoritmul de adaugare a condimentelor
       public abstract void addCondiments();
       
       //algoritmul comun de fierbere a apei
       public void boilWater()
       {
               System.out.println("Boiling water");
       }
       
       //algoritumul comun de turnare a bauturii in pahar
       public void pourInCup()
       {
               System.out.println("Pouring in a cup");
       }

}
